package com.yanqu.road.server.cmd.banquet.party;

import com.yanqu.road.pb.banquet.BanquetProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_BANQUET_FEAST_GET_REWARD, desc = "获取本服盛宴的人气礼")
public class GetFeastPartyRewardCmd extends AbstractCommand {
    private String banquetId;
    private int rewardId;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        BanquetProto.BanquetGetPopRewardReq reqMsg = BanquetProto.BanquetGetPopRewardReq.parseFrom(packet.getBytes());
        banquetId = reqMsg.getBanquetId();
        rewardId = reqMsg.getRewardId();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        BanquetProto.BanquetGetPopRewardReq reqMsg = BanquetProto.BanquetGetPopRewardReq.parseFrom(packet.getBytes());
        player.sendPacket(CrossProtocol.C_CROSS_FEAST_PARTY_REWARD,reqMsg.toBuilder());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
